package com.ruoyi.service.masterdate.impl;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.mapper.jpjs.person.PersonMapper;
import com.ruoyi.mapper.masterdate.EmployeeMapper;
import com.ruoyi.service.jpjs.person.PersonService;
import com.ruoyi.service.masterdate.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
@DataSource(value = DataSourceType.SLAVE)
public class EmployeeServiceImpl implements EmployeeService {
    @Autowired
    private EmployeeMapper employeeMapper;

    @Override
    public List<Map<String, Object>> findEmployeeAll(Map<String, Object> map) {
        return employeeMapper.findEmployeeAll(map);
    }

    @Override
    public Map<String, Object> findEmployee(String id) {
        return employeeMapper.findEmployee(id);
    }

    @Override
    public int addEmployee(Map<String, Object> map) {
        return employeeMapper.addEmployee(map);
    }

    @Override
    public int editEmployee(Map<String, Object> map) {
        return employeeMapper.editEmployee(map);
    }

    @Override
    public int checkNumberUnique(Map<String, Object> map) {
        return employeeMapper.checkNumberUnique(map);
    }
}
